// http://www.liulongbin.top  项目参考网址
//https://www.iplaysoft.com/free-image-hosting.html  免费图片存储服务器

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

//引入element 
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 引入样式文件
import  './styles/index.less'




Vue.config.productionTip = false


// import echarts from 'echarts'  // 新版 不能 使用
import * as echarts from "echarts"; // 需要这样使用
// console.log(echarts);
Vue.prototype.$echarts=echarts


//全局过滤器
Vue.filter('formDate', function (val1, data1) {
  let  val= new Date(val1)
  console.log(val);
  let y = val.getFullYear()
  let m = val.getMonth() + 1
  let days = val.getDate()
  let h = val.getHours()
  let mm = val.getMinutes()
  let ss = val.getSeconds()

  m = m < 10 ? '0' + m : m;
  days = days < 10 ? '0' + days : days;
  h = h < 10 ? '0' + h : h;
  mm = mm < 10 ? '0' + mm : mm;
  ss = ss < 10 ? '0' + ss : ss;
  if (data1 && data1.includes('yyyy-dd-mm')) {
      return `${y}- ${m}-${days}`

  } else {
      return `${y}- ${m}-${days} ${h}:${mm}:${ss}`
  }

})



new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
